<!doctype html>
<html>

<head>
    <meta charset="utf-8">
    <title>会员接口测试</title>
    <meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=0">
    <link rel="stylesheet" href="/node_modules/LobsterUIFrame/weui/css/weui.css" />
    <link rel="stylesheet" href="/node_modules/LobsterUIFrame/weui/css/weuix.css" />
    <script src="/node_modules/LobsterUIFrame/weui/js/zepto.min.js"></script>
    <script src="/node_modules/LobsterUIFrame/weui/js/zepto.weui.js"></script>
    <script src="/node_modules/LobsterUIFrame/weui/js/swipe.js"></script>
    <script src="/node_modules/LobsterUIFrame/weui/js/macy.js"></script>
    <script src="/node_modules/LobsterUIFrame/weui/js/php.js"></script>
    <script src="/lobstersdk/lobster.js"></script>
    <script src="../js/template-web.js"></script>
    <script src="/node_modules/LobsterUIFrame/weui/js/swipe.js"></script>
    <script src="/node_modules/LobsterUIFrame/weui/js/iscroll-lite.js"></script>
    <style>

    </style>
</head>

<body ontouchstart class="page-bd-15">
    <div class="weui-msg" id="s1">
        <div>开通会员数据</div>
        <div>{
            NickName:'周灿',
            UserId:'123',
            }</div>
        <div class="weui-msg__opr-area">
            <p class="weui-btn-area">
                <a href="javascript:;" id="registermember" class="weui-btn weui-btn_primary">开通会员</a>
            </p>
        </div>
        <div>查询会员数据</div>
        <div>
            { UserId: '123',
            }
        </div>
        <div class="weui-msg__opr-area">
            <p class="weui-btn-area">
                <a href="javascript:;" id="getmemberinfo" class="weui-btn weui-btn_primary">查询会员</a>

            </p>
        </div>
        <div>奖励积分数据</div>
        <div>
            {
                UserId: "123",
                TaskCode: "002",
                Memo: "2222",//非必填 
                OrderNo: "3213213",//非必填 
                Jine: 0,//非必填
            }
        </div>
        <div class="weui-msg__opr-area">
            <p class="weui-btn-area">
                <a href="javascript:;" id="bonus" class="weui-btn weui-btn_primary">奖励积分</a>

            </p>
        </div>
    </div>
</body>

</html> `
<script>

    lobsterh5.main({
        data: {
            page: 1,
            limit: 10,
            hasemore: true
        },
        //初始化页面
        pageload: function () {
            this.initevent();
        },
        //初始化事件
        initevent: function () {
            $("#registermember").click(function () {
                lobsterh5.CALLOUTSERVICE("member.member.registermember", {
                    NickName: '周灿',
                    UserId: '123',
                }).then(res => {
                    console.log(res);
                    alert("开通成功")
                }).catch(res => {
                    $.toast(res.msg, 'forbidden');
                });
            });
            $("#getmemberinfo").click(function () {
                lobsterh5.CALLOUTSERVICE("member.member.getmemberInfo", {
                    userId: '123',
                }).then(res => {
                    console.log(res);
                }).catch(res => {
                    $.toast(res.msg, 'forbidden');
                });
            });
            $("#bonus").click(function () {
                lobsterh5.CALLOUTSERVICE("member.member.bonus", {
                    UserId: "123",
                    TaskCode: "001",
                    Memo: "2222",//非必填 
                    OrderNo: "3213213",//非必填 
                    Jine: 10,//非必填
                }).then(res => {
                    console.log(res);
                }).catch(res => {
                    $.toast(res.msg, 'forbidden');
                });
            })
        }
    });

</script>